/**
 * 
 */
package controllers;

import client.gui.panels.PanelIF;
import client.gui.panels.VerificationPanel;
import entities.Message;

/**
 * @author Vodi
 *
 */
public class VerificationController implements ControllerIF {
	
	/**
	 * the time frame approval panel
	 */
	private VerificationPanel verificationPanel;

	/**
	 * reference of the hosting panel's controller
	 */
	private ViewTicketController hostController;
	
	
	
	public VerificationController(ViewTicketController viewTicketController) {
		this.hostController = viewTicketController;
	}

	/* (non-Javadoc)
	 * @see controllers.ControllerIF#getPanel()
	 */
	@Override
	public PanelIF getPanel() {
		return verificationPanel;
	}

	/* (non-Javadoc)
	 * @see controllers.ControllerIF#setPanel(client.gui.panels.PanelIF)
	 */
	@Override
	public void setPanel(PanelIF panel) {
		verificationPanel = (VerificationPanel) panel;
	}

	/* (non-Javadoc)
	 * @see controllers.ControllerIF#action()
	 */
	@Override
	public void action() {
		Message message = verificationPanel.getMessage();
		hostController.sendMessage(message);
	}

	/* (non-Javadoc)
	 * @see controllers.ControllerIF#decipherMessage(entities.Message)
	 */
	@Override
	public void decipherMessage(Message message) {}

}
